#ifndef __GAMEPLAY_SCENE_H__
#define __GAMEPLAY_SCENE_H__

#include "cocos2d.h"
#include "Box2D/Box2D.h"
#include "SimpleAudioEngine.h"
#include "CDebugDrawGLES.h"
#include "CPhysicsSprite.h"
#include "CMatch.h"

#include "Commons.h"

USING_NS_CC;

// enums that will be used as tags
enum {
	kTagTileMap = 0,
	kTagParentNode = 1,
	kTagAnimation1 = 2,
};
 

class BubbleGamePlayScence : public cocos2d::CCLayerColor
{
public:
	BubbleGamePlayScence();
	~BubbleGamePlayScence();

    virtual bool init();  
	void initPhysics();

    static cocos2d::CCScene* scene();
    
    // a selector callback
    void menuCloseCallback(CCObject* pSender);

    // implement the "static node()" method manually
    CREATE_FUNC(BubbleGamePlayScence);

	virtual void draw();
	void update(float dt);

	virtual void registerWithTouchDispatcher();
	virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent);
    virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent);
    virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent);
private:	
	CMatch* _match;
	CCSprite *_bear;
	CCAction *_walkAction;
	CCAction *_moveAction;
	BOOL _moving;
};

#endif  // __GAMEPLAY_SCENE_H__